package com.base.cn.platform.os.common.classes.topic;

import java.util.HashMap;
import java.util.Map;

/**
 * 话题分类枚举
 *
 * @author SK
 * @since 2018-05-21
 */
public enum ClassesTopicClassifyEnum {

    ORIGINAL(1, "原创"),
    DISCUSS(2, "讨论"),
    QUESTION(3, "疑问"),
    ACTIVITY(4, "活动"),
    OTHER(5, "其它");

    private int value;
    private String name;

    ClassesTopicClassifyEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public static Map<Integer, String> valueMap() {
        ClassesTopicClassifyEnum[] enums = ClassesTopicClassifyEnum.values();
        Map<Integer, String> classifies = new HashMap<>(enums.length);
        for (ClassesTopicClassifyEnum e : enums) {
            classifies.put(e.value, e.name);
        }
        return classifies;
    }
}
